#!/usr/bin/env ruby

# Shows help for introspection enabled SimpleRPC agents
#
# http://code.google.com/p/mcollective/

require 'mcollective'

include MCollective::RPC

template = "/etc/mcollective/rpc-help.erb"

if ARGV.length == 1
    agent = ARGV[0]
elsif ARGV.length == 2
    agent = ARGV[0]
    template = ARGV[1]
else
    puts("Please specify an agent to get help for")
    exit
end

require "mcollective/agent/#{agent}"

puts eval("MCollective::Agent::#{agent.capitalize}.help('#{template}')")

# vi:tabstop=4:expandtab:ai
